package com.neusoft.ysu.npms.service.impl;

import com.neusoft.ysu.npms.mapper.FirstriskMapper;
import com.neusoft.ysu.npms.mapper.RiskMapper;
import com.neusoft.ysu.npms.pojo.Firstrisk;
import com.neusoft.ysu.npms.pojo.Result;
import com.neusoft.ysu.npms.pojo.Risk;
import com.neusoft.ysu.npms.service.IFirstriskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 作者：刘金秋
 * @since 2024-06-18
 */
@Service
public class FirstriskServiceImpl implements IFirstriskService {
    @Autowired
    FirstriskMapper firstriskMapper;
    @Override
    public Result add(Firstrisk firstrisk) {
        return new Result<>(0, "", firstriskMapper.add(firstrisk));
    }
    @Override
    public Result deleteFrisk(Firstrisk firstrisk){
        return new Result<>(0,"",firstriskMapper.deleteFrisk(firstrisk));
    }
    @Override
    public Result updateFrisk(Firstrisk firstrisk){
        return new Result<>(0,"",firstriskMapper.updateFrisk(firstrisk));
    }
    @Override
    public Result selectAll(){
        return new Result<>(0,"",firstriskMapper.selectAll());
    }
    @Override
    public Result findById(Firstrisk firstrisk){
        return new Result<>(0,"",firstriskMapper.findById(firstrisk));
    }
    @Override
    public Firstrisk select() {
        Firstrisk u = firstriskMapper.select();
        return u;
    }

}
